<?php
namespace app\index\controller;
use library\Controller;
use app\index\service\CompanyService;
use think\Db;


/**
 * 基类控制器
 * Class Base
 * @package app\company\controller
 */
class Base extends Controller
{
	public $company;
	
	public function __construct()
    {
    	parent::__construct();
        $result = CompanyService::CompanyInfo(session('company_user.id'));
		if(!$result){
			$this->error('数据错误');
		}
		$this->company = $result;
		$this->is_contract = Db::name('system_contract')->where(['company_id'=>$this->company['id'],'status'=>1])->order('id desc')->field('id,account_type,setmeal_type')->find();
    }
}
